export default {
  methods: {
    $$delBox(message, title, cancelMessage) {
      return new Promise((resolve, reject) => {
        this.$confirm(message || '此操作将永久删除该项, 是否继续?', title || '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(action => {
          resolve(action)
        }).catch(() => {
          this.$message.info(cancelMessage || '已取消删除')
          reject()
        })
      })
    }
  }
}
